<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/commons/global.jsp"%>
<script type="text/javascript">
    $(function() {
    	
        
        $('#familyAddAreaCode').combotree({
        	url: '${path }/areaInfo/tree',
            parentField : 'pid',
            panelHeight : 'auto'
        });
        
    	
    	
        $('#familyAddForm').form({
            url : '${path }/family/add',
            onSubmit : function() {
                progressLoad();
                var isValid = $(this).form('validate');
                if (!isValid) {
                    progressClose();
                }
                return isValid;
            },
            success : function(result) {
                progressClose();
                result = $.parseJSON(result);
                if (result.success) {
                    parent.$.modalDialog.openner_dataGrid.datagrid('reload');//之所以能在这里调用到parent.$.modalDialog.openner_dataGrid这个对象，是因为user.jsp页面预定义好了
                    parent.$.modalDialog.handler.dialog('close');
                } else {
                    var form = $('#familyAddForm');
                    parent.$.messager.alert('错误', eval(result.msg), 'error');
                }
            }
        });
    });
</script>
<div class="easyui-layout" data-options="fit:true,border:false">
	<div data-options="region:'center',border:false"
		style="overflow: hidden; padding: 3px;">
		<form id="familyAddForm" method="post">
			<table class="grid">

				<tr>
					<td>家庭编号</td>
					<td><input name="familyNo" type="text" placeholder="请输入familyNo"
						"class="easyui-validatebox" data-options="required:true" value=""></td>
				</tr>
				<tr>
					<td>户主名称</td>
					<td><input name="housemaster" type="text" placeholder="请输入户主名称"
						"class="easyui-validatebox" data-options="required:true" value=""></td>
				</tr>
				<tr>
					<td>身份证号</td>
					<td><input name="cardNo" type="text" placeholder="请输入身份证号"
						"class="easyui-validatebox" data-options="required:true" value=""></td>
				</tr>
            <tr>
            <td>地区</td>
            <td><select id="familyAddAreaCode" name="areaNo" style="width: 340px; height: 90px;" class="easyui-validatebox" data-options="required:true"></select></td>
            
            </tr>
			</table>
		</form>
	</div>
</div>